package com.example.day12.ex03;

interface Jumpping {
    void jump();
}
class JumppingOperator {
    public void useJumpping(Jumpping j) {
        j.jump();
    }
    public Jumpping getJumpping() {
        Jumpping j = new Cat();
        return j;
    }
}
class Cat implements Jumpping {
    @Override
    public void jump() {
        System.out.println("猫可以跳高了");
    }
}
public class JumppingDemo {
    public static void main(String[] args) {
        JumppingOperator jo = new JumppingOperator();
        Jumpping j = new Cat();
        jo.useJumpping(j);
        Jumpping j2 = jo.getJumpping();
        j2.jump();
    }
}